package com.second.app.common;

import lombok.Data;

/**
 * @author gyz
 * @date 2020/12/26 13:33
 */
@Data

public class SecondResponse {


    private Integer code;

    private String message;

    private Object data;

    public SecondResponse(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public SecondResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    public static SecondResponse success(Integer code, String message) {

        return new SecondResponse(code, message);
    }

    public static SecondResponse error(Integer code, String message) {

        return new SecondResponse(code, message);
    }

}
